package org.dtrd.modules.device.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.device.entity.po.DtrdEntRdDevice;

import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author xiao
 * @since 2022-01-11
 */
@Data
@ApiModel(value = "详情")
public class DeviceDetail {

    private String dataId;

    @ApiModelProperty("用户id")
    private Integer userId;

    @ApiModelProperty("设备序列号")
    private String deviceSn;

    @ApiModelProperty("绑定状态  1已绑定 2 解绑")
    private Integer deviceBindState;

    private String deviceImsi;

    private String deviceImei;

    @ApiModelProperty("设备品牌  1小糖医  2 爱奥乐  3 微策")
    private Integer deviceBrand;

    @ApiModelProperty("设备种类  1 血糖仪 2 血压计")
    private Integer deviceCategory;

    @ApiModelProperty("设备激活时间")
    private Date activateTime;

    public DeviceDetail parseFromPo(DtrdEntRdDevice po) {
        dataId = po.getDataId();
        userId = po.getUserId();
        deviceSn = po.getDeviceSn();
        deviceBindState = po.getDeviceBindState();
        deviceImsi = po.getDeviceImsi();
        deviceImei = po.getDeviceImei();
        deviceCategory = po.getDeviceCategory();
        deviceBrand=po.getDeviceBrand();
        activateTime = po.getActivateTime();
        return this;
    }
}
